package com.itcam.phaseiii.lambda_;

/**
 * Author:Cammy.Wu
 * Date:2024-04-29
 * Description:
 */

public class LambdaDemo03 {
    public static void main(String[] args) {
        use(new A() {
            @Override
            public void method() {
                System.out.println("匿名内部类...");
            }
        });

        use(() -> {
            System.out.println("Lambda表达式...");
        });
    }

    public static void use(A a) {
        a.method();
    }
}

interface A {
    void method();
}
